#ifndef _SCENEWIDGET_H_
#define _SCENEWIDGET_H_

#include <SECore/Signal.h>
#include <SEUi/Widget/Widget.h>
#include <optional>

namespace SEngine
{
    class EditLayer;
    class Actor;
    class Scene;
    class SceneWidget : public Widget
    {
    public:
        SceneWidget(EditLayer & layer);
        virtual ~SceneWidget() = default;

    protected:
        virtual void BeginUpdate() override;
        virtual void UpdateImpl(int delta) override;
        virtual void EndUpdate() override;

    private:
        void OnFocusActor(Actor & actor);
        void OnRightClickMenu();
        void OnShowActor();
        void OnItemRightClickMenu(Actor & actor);
        void RecurseShowActor(Actor & curActor);
        void ResetSelectActor();
        void CreateMenu(std::shared_ptr<Actor> actor);

    public:
        Signal<glm::vec3> SignalFocusActor;

    private:
        EditLayer & m_layer;
    };
} // namespace SEngine


#endif